package liangtWorkSpace.proxy.subject.House;

import java.lang.reflect.Proxy;

/**
 * @ClassName BuyHourseHandleProxy
 * @Description : 功能说明
 * @Author : LiangT
 * @Date : 2020/4/13 17:33
 */
public class BuyHourseHandleProxy {

    public static void main(String[] args) {
        BuyHourse buyHourse = new BuyHourseImp();
        buyHourse = (BuyHourse) Proxy.newProxyInstance(buyHourse.getClass().getClassLoader(),buyHourse.getClass().getInterfaces(),new BuyHourseHandle(buyHourse));
        buyHourse.buyHourse();
        buyHourse.say();
    }
}
